+ Reply to Thread
Results 1 to 3 of 3

Thread: [IPB 2.1] Moving post in forum results in duplicate/empty post on site

  1. Join Date
    Jun 2006
    Posts
    6

    [IPB 2.1] Moving post in forum results in duplicate/empty post on site

    Hey, I'm using IPB v2.1 with EP-Dev Forum News v2.20, and so far it's been the best thing that I've found to bring my forum's homepage to life.

    Just a heads up, I found an error today, that causes a blank post when you manually move a post in IPB. After moving the post, the post featured on the website using EP-Dev Forum News then appears blank, in terms of post content. The topic title and author, etc, remain in-tact, it's just the post content that goes blank.

    It only happens when you tick "Leave a link to the new topic in the source forum?" when moving the post. After I removed the dummy topic from the forum - which was a redirection to its new location - everything looked fine on the homepage again.

    It's a bug, but it's managable!

    Just wanted to give you guys a heads up if you didn't know about it already.

    Thanks for the great script.

  2. Join Date
    Aug 2004
    Posts
    781

    Re: [IPB 2.1] Moving post in forum results in duplicate/empty post on site

    Thanks for letting me know... I will see if I can get it fixed in next version.

  3. Join Date
    Jun 2006
    Posts
    6

    Re: [IPB 2.1] Moving post in forum results in duplicate/empty post on site

    Haven't been on this forum in a while and realized I never posted the fix for this - sorry!
    Although the script fully works with the latest IPB, this bug still exists, so here's the fix:

    Open classes/sources/Forum/Invision_Power_Board_2.1.php

    Find (around line 100):

    Code:
    // Prepare WHERE clause
    $WHERE = "forum_id='" . implode("' or forum_id='", $ids_to_fetch) . "'";
    		
    // Pull from database
    $this->DB->query("SELECT tid, title, posts, starter_id, start_date, starter_name, views, forum_id FROM " . $this->DB->prefix . "topics WHERE ". $WHERE ." ORDER BY tid DESC LIMIT " . $number_to_fetch);
    Replace with:

    Code:
    // Prepare WHERE clause
    $WHERE = "(forum_id='" . implode("' or forum_id='", $ids_to_fetch) . "') AND moved_to IS NULL";
    		
    // Pull from database
    $this->DB->query("SELECT tid, title, posts, starter_id, start_date, starter_name, views, forum_id, moved_to FROM " . $this->DB->prefix . "topics WHERE ". $WHERE ." ORDER BY tid DESC LIMIT " . $number_to_fetch);

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts